
<!DOCTYPE html>

<html>
  
<!-- Mirrored from docs.sympy.org/latest/modules/liealgebras/index.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 15 Jan 2022 03:24:29 GMT -->
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=utf-8" /><!-- /Added by HTTrack -->
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />

    <title>Lie Algebra &#8212; SymPy 1.9 documentation</title>
    <link rel="stylesheet" type="text/css" href="../../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../../_static/default.css" />
    <link rel="stylesheet" type="text/css" href="../../_static/graphviz.css" />
    <link rel="stylesheet" type="text/css" href="../../_static/plot_directive.css" />
    <link rel="stylesheet" type="text/css" href="../../../../live.sympy.org/static/live-core.css" />
    <link rel="stylesheet" type="text/css" href="../../../../live.sympy.org/static/live-autocomplete.css" />
    <link rel="stylesheet" type="text/css" href="../../../../live.sympy.org/static/live-sphinx.css" />
    
    <script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
    <script src="../../_static/jquery.js"></script>
    <script src="../../_static/underscore.js"></script>
    <script src="../../_static/doctools.js"></script>
    <script src="../../../../live.sympy.org/static/utilities.js"></script>
    <script src="../../../../live.sympy.org/static/external/classy.js"></script>
    <script src="../../../../live.sympy.org/static/live-core.js"></script>
    <script src="../../../../live.sympy.org/static/live-autocomplete.js"></script>
    <script src="../../../../live.sympy.org/static/live-sphinx.js"></script>
    
    <link rel="shortcut icon" href="../../_static/sympy-notailtext-favicon.ico"/>
    <link href="index.html" rel="canonical" />
    
    <link rel="index" title="Index" href="../../genindex.html" />
    <link rel="search" title="Search" href="../../search.html" />
    <link rel="next" title="Logic" href="../logic.html" />
    <link rel="prev" title="Interactive" href="../interactive.html" /> 
  </head><body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="../logic.html" title="Logic"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="../interactive.html" title="Interactive"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../../index.html">SymPy 1.9 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="../index.html" accesskey="U">SymPy Modules Reference</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="#">Lie Algebra</a></li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <section id="module-sympy.liealgebras">
<span id="lie-algebra"></span><h1>Lie Algebra<a class="headerlink" href="#module-sympy.liealgebras" title="Permalink to this headline">¶</a></h1>
<dl class="py class">
<dt class="sig sig-object py" id="sympy.liealgebras.root_system.RootSystem">
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">sympy.liealgebras.root_system.</span></span><span class="sig-name descname"><span class="pre">RootSystem</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">cartantype</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/root_system.py#L4-L201"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.root_system.RootSystem" title="Permalink to this definition">¶</a></dt>
<dd><p>Represent the root system of a simple Lie algebra</p>
<p>Every simple Lie algebra has a unique root system.  To find the root
system, we first consider the Cartan subalgebra of g, which is the maximal
abelian subalgebra, and consider the adjoint action of g on this
subalgebra.  There is a root system associated with this action. Now, a
root system over a vector space V is a set of finite vectors Phi (called
roots), which satisfy:</p>
<ol class="arabic simple">
<li><p>The roots span V</p></li>
<li><p>The only scalar multiples of x in Phi are x and -x</p></li>
<li><p>For every x in Phi, the set Phi is closed under reflection
through the hyperplane perpendicular to x.</p></li>
<li><p>If x and y are roots in Phi, then the projection of y onto
the line through x is a half-integral multiple of x.</p></li>
</ol>
<p>Now, there is a subset of Phi, which we will call Delta, such that:
1.  Delta is a basis of V
2.  Each root x in Phi can be written x = sum k_y y for y in Delta</p>
<p>The elements of Delta are called the simple roots.
Therefore, we see that the simple roots span the root space of a given
simple Lie algebra.</p>
<dl class="simple">
<dt>References: <a class="reference external" href="https://en.wikipedia.org/wiki/Root_system">https://en.wikipedia.org/wiki/Root_system</a></dt><dd><p>Lie Algebras and Representation Theory - Humphreys</p>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.root_system.RootSystem.add_as_roots">
<span class="sig-name descname"><span class="pre">add_as_roots</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">root1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">root2</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/root_system.py#L144-L170"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.root_system.RootSystem.add_as_roots" title="Permalink to this definition">¶</a></dt>
<dd><p>Add two roots together if and only if their sum is also a root</p>
<p>It takes as input two vectors which should be roots.  It then computes
their sum and checks if it is in the list of all possible roots.  If it
is, it returns the sum.  Otherwise it returns a string saying that the
sum is not a root.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.liealgebras.root_system</span> <span class="kn">import</span> <span class="n">RootSystem</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">RootSystem</span><span class="p">(</span><span class="s2">&quot;A3&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span><span class="o">.</span><span class="n">add_as_roots</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">],</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span><span class="p">])</span>
<span class="go">[1, 0, 0, -1]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span><span class="o">.</span><span class="n">add_as_roots</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">],</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">])</span>
<span class="go">&#39;The sum of these two roots is not a root&#39;</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.root_system.RootSystem.add_simple_roots">
<span class="sig-name descname"><span class="pre">add_simple_roots</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">root1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">root2</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/root_system.py#L115-L142"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.root_system.RootSystem.add_simple_roots" title="Permalink to this definition">¶</a></dt>
<dd><p>Add two simple roots together</p>
<p>The function takes as input two integers, root1 and root2.  It then
uses these integers as keys in the dictionary of simple roots, and gets
the corresponding simple roots, and then adds them together.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.liealgebras.root_system</span> <span class="kn">import</span> <span class="n">RootSystem</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">RootSystem</span><span class="p">(</span><span class="s2">&quot;A3&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">newroot</span> <span class="o">=</span> <span class="n">c</span><span class="o">.</span><span class="n">add_simple_roots</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">newroot</span>
<span class="go">[1, 0, -1, 0]</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.root_system.RootSystem.all_roots">
<span class="sig-name descname"><span class="pre">all_roots</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/root_system.py#L74-L92"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.root_system.RootSystem.all_roots" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate all the roots of a given root system</p>
<p>The result is a dictionary where the keys are integer numbers.  It
generates the roots by getting the dictionary of all positive roots
from the bases classes, and then taking each root, and multiplying it
by -1 and adding it to the dictionary.  In this way all the negative
roots are generated.</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.root_system.RootSystem.cartan_matrix">
<span class="sig-name descname"><span class="pre">cartan_matrix</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/root_system.py#L173-L187"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.root_system.RootSystem.cartan_matrix" title="Permalink to this definition">¶</a></dt>
<dd><p>Cartan matrix of Lie algebra associated with this root system</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.liealgebras.root_system</span> <span class="kn">import</span> <span class="n">RootSystem</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">RootSystem</span><span class="p">(</span><span class="s2">&quot;A3&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span><span class="o">.</span><span class="n">cartan_matrix</span><span class="p">()</span>
<span class="go">Matrix([</span>
<span class="go">    [ 2, -1,  0],</span>
<span class="go">    [-1,  2, -1],</span>
<span class="go">    [ 0, -1,  2]])</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.root_system.RootSystem.dynkin_diagram">
<span class="sig-name descname"><span class="pre">dynkin_diagram</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/root_system.py#L189-L201"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.root_system.RootSystem.dynkin_diagram" title="Permalink to this definition">¶</a></dt>
<dd><p>Dynkin diagram of the Lie algebra associated with this root system</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.liealgebras.root_system</span> <span class="kn">import</span> <span class="n">RootSystem</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">RootSystem</span><span class="p">(</span><span class="s2">&quot;A3&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="nb">print</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">dynkin_diagram</span><span class="p">())</span>
<span class="go">0---0---0</span>
<span class="go">1   2   3</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.root_system.RootSystem.root_space">
<span class="sig-name descname"><span class="pre">root_space</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/root_system.py#L94-L113"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.root_system.RootSystem.root_space" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the span of the simple roots</p>
<p>The root space is the vector space spanned by the simple roots, i.e. it
is a vector space with a distinguished basis, the simple roots.  This
method returns a string that represents the root space as the span of
the simple roots, alpha[1],…., alpha[n].</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.liealgebras.root_system</span> <span class="kn">import</span> <span class="n">RootSystem</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">RootSystem</span><span class="p">(</span><span class="s2">&quot;A3&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span><span class="o">.</span><span class="n">root_space</span><span class="p">()</span>
<span class="go">&#39;alpha[1] + alpha[2] + alpha[3]&#39;</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.root_system.RootSystem.simple_roots">
<span class="sig-name descname"><span class="pre">simple_roots</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/root_system.py#L48-L71"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.root_system.RootSystem.simple_roots" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate the simple roots of the Lie algebra</p>
<p>The rank of the Lie algebra determines the number of simple roots that
it has.  This method obtains the rank of the Lie algebra, and then uses
the simple_root method from the Lie algebra classes to generate all the
simple roots.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.liealgebras.root_system</span> <span class="kn">import</span> <span class="n">RootSystem</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">RootSystem</span><span class="p">(</span><span class="s2">&quot;A3&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">roots</span> <span class="o">=</span> <span class="n">c</span><span class="o">.</span><span class="n">simple_roots</span><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">roots</span>
<span class="go">{1: [1, -1, 0, 0], 2: [0, 1, -1, 0], 3: [0, 0, 1, -1]}</span>
</pre></div>
</div>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="sympy.liealgebras.type_a.TypeA">
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">sympy.liealgebras.type_a.</span></span><span class="sig-name descname"><span class="pre">TypeA</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">n</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_a.py#L5-L166"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_a.TypeA" title="Permalink to this definition">¶</a></dt>
<dd><p>This class contains the information about
the A series of simple Lie algebras.
====</p>
<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_a.TypeA.basic_root">
<span class="sig-name descname"><span class="pre">basic_root</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">i</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">j</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_a.py#L32-L44"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_a.TypeA.basic_root" title="Permalink to this definition">¶</a></dt>
<dd><p>This is a method just to generate roots
with a 1 iin the ith position and a -1
in the jth position.</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_a.TypeA.basis">
<span class="sig-name descname"><span class="pre">basis</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_a.py#L148-L153"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_a.TypeA.basis" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the number of independent generators of A_n</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_a.TypeA.cartan_matrix">
<span class="sig-name descname"><span class="pre">cartan_matrix</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_a.py#L115-L146"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_a.TypeA.cartan_matrix" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the Cartan matrix for A_n.
The Cartan matrix matrix for a Lie algebra is
generated by assigning an ordering to the simple
roots, (alpha[1], …., alpha[l]).  Then the ijth
entry of the Cartan matrix is (&lt;alpha[i],alpha[j]&gt;).</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.liealgebras.cartan_type</span> <span class="kn">import</span> <span class="n">CartanType</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">CartanType</span><span class="p">(</span><span class="s1">&#39;A4&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span><span class="o">.</span><span class="n">cartan_matrix</span><span class="p">()</span>
<span class="go">Matrix([</span>
<span class="go">[ 2, -1,  0,  0],</span>
<span class="go">[-1,  2, -1,  0],</span>
<span class="go">[ 0, -1,  2, -1],</span>
<span class="go">[ 0,  0, -1,  2]])</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_a.TypeA.dimension">
<span class="sig-name descname"><span class="pre">dimension</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_a.py#L18-L29"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_a.TypeA.dimension" title="Permalink to this definition">¶</a></dt>
<dd><p>Dimension of the vector space V underlying the Lie algebra</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.liealgebras.cartan_type</span> <span class="kn">import</span> <span class="n">CartanType</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">CartanType</span><span class="p">(</span><span class="s2">&quot;A4&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span><span class="o">.</span><span class="n">dimension</span><span class="p">()</span>
<span class="go">5</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_a.TypeA.highest_root">
<span class="sig-name descname"><span class="pre">highest_root</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_a.py#L101-L106"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_a.TypeA.highest_root" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the highest weight root for A_n</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_a.TypeA.lie_algebra">
<span class="sig-name descname"><span class="pre">lie_algebra</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_a.py#L155-L160"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_a.TypeA.lie_algebra" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the Lie algebra associated with A_n</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_a.TypeA.positive_roots">
<span class="sig-name descname"><span class="pre">positive_roots</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_a.py#L75-L99"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_a.TypeA.positive_roots" title="Permalink to this definition">¶</a></dt>
<dd><p>This method generates all the positive roots of
A_n.  This is half of all of the roots of A_n;
by multiplying all the positive roots by -1 we
get the negative roots.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.liealgebras.cartan_type</span> <span class="kn">import</span> <span class="n">CartanType</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">CartanType</span><span class="p">(</span><span class="s2">&quot;A3&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span><span class="o">.</span><span class="n">positive_roots</span><span class="p">()</span>
<span class="go">{1: [1, -1, 0, 0], 2: [1, 0, -1, 0], 3: [1, 0, 0, -1], 4: [0, 1, -1, 0],</span>
<span class="go">        5: [0, 1, 0, -1], 6: [0, 0, 1, -1]}</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_a.TypeA.roots">
<span class="sig-name descname"><span class="pre">roots</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_a.py#L108-L113"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_a.TypeA.roots" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the total number of roots for A_n</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_a.TypeA.simple_root">
<span class="sig-name descname"><span class="pre">simple_root</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">i</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_a.py#L46-L73"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_a.TypeA.simple_root" title="Permalink to this definition">¶</a></dt>
<dd><p>Every lie algebra has a unique root system.
Given a root system Q, there is a subset of the
roots such that an element of Q is called a
simple root if it cannot be written as the sum
of two elements in Q.  If we let D denote the
set of simple roots, then it is clear that every
element of Q can be written as a linear combination
of elements of D with all coefficients non-negative.</p>
<p>In A_n the ith simple root is the root which has a 1
in the ith position, a -1 in the (i+1)th position,
and zeroes elsewhere.</p>
<p>This method returns the ith simple root for the A series.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.liealgebras.cartan_type</span> <span class="kn">import</span> <span class="n">CartanType</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">CartanType</span><span class="p">(</span><span class="s2">&quot;A4&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span><span class="o">.</span><span class="n">simple_root</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
<span class="go">[1, -1, 0, 0, 0]</span>
</pre></div>
</div>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="sympy.liealgebras.type_b.TypeB">
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">sympy.liealgebras.type_b.</span></span><span class="sig-name descname"><span class="pre">TypeB</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">n</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_b.py#L4-L172"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_b.TypeB" title="Permalink to this definition">¶</a></dt>
<dd><dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_b.TypeB.basic_root">
<span class="sig-name descname"><span class="pre">basic_root</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">i</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">j</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_b.py#L25-L35"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_b.TypeB.basic_root" title="Permalink to this definition">¶</a></dt>
<dd><p>This is a method just to generate roots
with a 1 iin the ith position and a -1
in the jth position.</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_b.TypeB.basis">
<span class="sig-name descname"><span class="pre">basis</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_b.py#L152-L158"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_b.TypeB.basis" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the number of independent generators of B_n</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_b.TypeB.cartan_matrix">
<span class="sig-name descname"><span class="pre">cartan_matrix</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_b.py#L118-L150"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_b.TypeB.cartan_matrix" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the Cartan matrix for B_n.
The Cartan matrix matrix for a Lie algebra is
generated by assigning an ordering to the simple
roots, (alpha[1], …., alpha[l]).  Then the ijth
entry of the Cartan matrix is (&lt;alpha[i],alpha[j]&gt;).</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.liealgebras.cartan_type</span> <span class="kn">import</span> <span class="n">CartanType</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">CartanType</span><span class="p">(</span><span class="s1">&#39;B4&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span><span class="o">.</span><span class="n">cartan_matrix</span><span class="p">()</span>
<span class="go">Matrix([</span>
<span class="go">[ 2, -1,  0,  0],</span>
<span class="go">[-1,  2, -1,  0],</span>
<span class="go">[ 0, -1,  2, -2],</span>
<span class="go">[ 0,  0, -1,  2]])</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_b.TypeB.dimension">
<span class="sig-name descname"><span class="pre">dimension</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_b.py#L11-L23"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_b.TypeB.dimension" title="Permalink to this definition">¶</a></dt>
<dd><p>Dimension of the vector space V underlying the Lie algebra</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.liealgebras.cartan_type</span> <span class="kn">import</span> <span class="n">CartanType</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">CartanType</span><span class="p">(</span><span class="s2">&quot;B3&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span><span class="o">.</span><span class="n">dimension</span><span class="p">()</span>
<span class="go">3</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_b.TypeB.lie_algebra">
<span class="sig-name descname"><span class="pre">lie_algebra</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_b.py#L160-L166"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_b.TypeB.lie_algebra" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the Lie algebra associated with B_n</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_b.TypeB.positive_roots">
<span class="sig-name descname"><span class="pre">positive_roots</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_b.py#L73-L108"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_b.TypeB.positive_roots" title="Permalink to this definition">¶</a></dt>
<dd><p>This method generates all the positive roots of
A_n.  This is half of all of the roots of B_n;
by multiplying all the positive roots by -1 we
get the negative roots.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.liealgebras.cartan_type</span> <span class="kn">import</span> <span class="n">CartanType</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">CartanType</span><span class="p">(</span><span class="s2">&quot;A3&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span><span class="o">.</span><span class="n">positive_roots</span><span class="p">()</span>
<span class="go">{1: [1, -1, 0, 0], 2: [1, 0, -1, 0], 3: [1, 0, 0, -1], 4: [0, 1, -1, 0],</span>
<span class="go">        5: [0, 1, 0, -1], 6: [0, 0, 1, -1]}</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_b.TypeB.roots">
<span class="sig-name descname"><span class="pre">roots</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_b.py#L110-L116"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_b.TypeB.roots" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the total number of roots for B_n”</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_b.TypeB.simple_root">
<span class="sig-name descname"><span class="pre">simple_root</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">i</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_b.py#L37-L71"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_b.TypeB.simple_root" title="Permalink to this definition">¶</a></dt>
<dd><p>Every lie algebra has a unique root system.
Given a root system Q, there is a subset of the
roots such that an element of Q is called a
simple root if it cannot be written as the sum
of two elements in Q.  If we let D denote the
set of simple roots, then it is clear that every
element of Q can be written as a linear combination
of elements of D with all coefficients non-negative.</p>
<p>In B_n the first n-1 simple roots are the same as the
roots in A_(n-1) (a 1 in the ith position, a -1 in
the (i+1)th position, and zeroes elsewhere).  The n-th
simple root is the root with a 1 in the nth position
and zeroes elsewhere.</p>
<p>This method returns the ith simple root for the B series.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.liealgebras.cartan_type</span> <span class="kn">import</span> <span class="n">CartanType</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">CartanType</span><span class="p">(</span><span class="s2">&quot;B3&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span><span class="o">.</span><span class="n">simple_root</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
<span class="go">[0, 1, -1]</span>
</pre></div>
</div>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="sympy.liealgebras.type_c.TypeC">
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">sympy.liealgebras.type_c.</span></span><span class="sig-name descname"><span class="pre">TypeC</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">n</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_c.py#L4-L171"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_c.TypeC" title="Permalink to this definition">¶</a></dt>
<dd><dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_c.TypeC.basic_root">
<span class="sig-name descname"><span class="pre">basic_root</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">i</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">j</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_c.py#L26-L33"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_c.TypeC.basic_root" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate roots with 1 in ith position and a -1 in jth position</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_c.TypeC.basis">
<span class="sig-name descname"><span class="pre">basis</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_c.py#L151-L157"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_c.TypeC.basis" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the number of independent generators of C_n</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_c.TypeC.cartan_matrix">
<span class="sig-name descname"><span class="pre">cartan_matrix</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_c.py#L117-L148"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_c.TypeC.cartan_matrix" title="Permalink to this definition">¶</a></dt>
<dd><p>The Cartan matrix for C_n</p>
<p>The Cartan matrix matrix for a Lie algebra is
generated by assigning an ordering to the simple
roots, (alpha[1], …., alpha[l]).  Then the ijth
entry of the Cartan matrix is (&lt;alpha[i],alpha[j]&gt;).</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.liealgebras.cartan_type</span> <span class="kn">import</span> <span class="n">CartanType</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">CartanType</span><span class="p">(</span><span class="s1">&#39;C4&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span><span class="o">.</span><span class="n">cartan_matrix</span><span class="p">()</span>
<span class="go">Matrix([</span>
<span class="go">[ 2, -1,  0,  0],</span>
<span class="go">[-1,  2, -1,  0],</span>
<span class="go">[ 0, -1,  2, -1],</span>
<span class="go">[ 0,  0, -2,  2]])</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_c.TypeC.dimension">
<span class="sig-name descname"><span class="pre">dimension</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_c.py#L12-L24"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_c.TypeC.dimension" title="Permalink to this definition">¶</a></dt>
<dd><p>Dimension of the vector space V underlying the Lie algebra</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.liealgebras.cartan_type</span> <span class="kn">import</span> <span class="n">CartanType</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">CartanType</span><span class="p">(</span><span class="s2">&quot;C3&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span><span class="o">.</span><span class="n">dimension</span><span class="p">()</span>
<span class="go">3</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_c.TypeC.lie_algebra">
<span class="sig-name descname"><span class="pre">lie_algebra</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_c.py#L159-L165"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_c.TypeC.lie_algebra" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the Lie algebra associated with C_n”</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_c.TypeC.positive_roots">
<span class="sig-name descname"><span class="pre">positive_roots</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_c.py#L72-L107"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_c.TypeC.positive_roots" title="Permalink to this definition">¶</a></dt>
<dd><p>Generates all the positive roots of A_n</p>
<p>This is half of all of the roots of C_n; by multiplying all the
positive roots by -1 we get the negative roots.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.liealgebras.cartan_type</span> <span class="kn">import</span> <span class="n">CartanType</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">CartanType</span><span class="p">(</span><span class="s2">&quot;A3&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span><span class="o">.</span><span class="n">positive_roots</span><span class="p">()</span>
<span class="go">{1: [1, -1, 0, 0], 2: [1, 0, -1, 0], 3: [1, 0, 0, -1], 4: [0, 1, -1, 0],</span>
<span class="go">        5: [0, 1, 0, -1], 6: [0, 0, 1, -1]}</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_c.TypeC.roots">
<span class="sig-name descname"><span class="pre">roots</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_c.py#L109-L115"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_c.TypeC.roots" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the total number of roots for C_n”</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_c.TypeC.simple_root">
<span class="sig-name descname"><span class="pre">simple_root</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">i</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_c.py#L35-L69"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_c.TypeC.simple_root" title="Permalink to this definition">¶</a></dt>
<dd><p>The ith simple root for the C series</p>
<p>Every lie algebra has a unique root system.
Given a root system Q, there is a subset of the
roots such that an element of Q is called a
simple root if it cannot be written as the sum
of two elements in Q.  If we let D denote the
set of simple roots, then it is clear that every
element of Q can be written as a linear combination
of elements of D with all coefficients non-negative.</p>
<p>In C_n, the first n-1 simple roots are the same as
the roots in A_(n-1) (a 1 in the ith position, a -1
in the (i+1)th position, and zeroes elsewhere).  The
nth simple root is the root in which there is a 2 in
the nth position and zeroes elsewhere.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.liealgebras.cartan_type</span> <span class="kn">import</span> <span class="n">CartanType</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">CartanType</span><span class="p">(</span><span class="s2">&quot;C3&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span><span class="o">.</span><span class="n">simple_root</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
<span class="go">[0, 1, -1]</span>
</pre></div>
</div>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="sympy.liealgebras.type_d.TypeD">
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">sympy.liealgebras.type_d.</span></span><span class="sig-name descname"><span class="pre">TypeD</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">n</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_d.py#L4-L175"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_d.TypeD" title="Permalink to this definition">¶</a></dt>
<dd><dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_d.TypeD.basic_root">
<span class="sig-name descname"><span class="pre">basic_root</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">i</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">j</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_d.py#L26-L38"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_d.TypeD.basic_root" title="Permalink to this definition">¶</a></dt>
<dd><p>This is a method just to generate roots
with a 1 iin the ith position and a -1
in the jth position.</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_d.TypeD.basis">
<span class="sig-name descname"><span class="pre">basis</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_d.py#L152-L157"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_d.TypeD.basis" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the number of independent generators of D_n</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_d.TypeD.cartan_matrix">
<span class="sig-name descname"><span class="pre">cartan_matrix</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_d.py#L117-L150"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_d.TypeD.cartan_matrix" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the Cartan matrix for D_n.
The Cartan matrix matrix for a Lie algebra is
generated by assigning an ordering to the simple
roots, (alpha[1], …., alpha[l]).  Then the ijth
entry of the Cartan matrix is (&lt;alpha[i],alpha[j]&gt;).</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.liealgebras.cartan_type</span> <span class="kn">import</span> <span class="n">CartanType</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">CartanType</span><span class="p">(</span><span class="s1">&#39;D4&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span><span class="o">.</span><span class="n">cartan_matrix</span><span class="p">()</span>
<span class="go">    Matrix([</span>
<span class="go">    [ 2, -1,  0,  0],</span>
<span class="go">    [-1,  2, -1, -1],</span>
<span class="go">    [ 0, -1,  2,  0],</span>
<span class="go">    [ 0, -1,  0,  2]])</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_d.TypeD.dimension">
<span class="sig-name descname"><span class="pre">dimension</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_d.py#L12-L24"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_d.TypeD.dimension" title="Permalink to this definition">¶</a></dt>
<dd><p>Dmension of the vector space V underlying the Lie algebra</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.liealgebras.cartan_type</span> <span class="kn">import</span> <span class="n">CartanType</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">CartanType</span><span class="p">(</span><span class="s2">&quot;D4&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span><span class="o">.</span><span class="n">dimension</span><span class="p">()</span>
<span class="go">4</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_d.TypeD.lie_algebra">
<span class="sig-name descname"><span class="pre">lie_algebra</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_d.py#L159-L165"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_d.TypeD.lie_algebra" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the Lie algebra associated with D_n”</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_d.TypeD.positive_roots">
<span class="sig-name descname"><span class="pre">positive_roots</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_d.py#L79-L107"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_d.TypeD.positive_roots" title="Permalink to this definition">¶</a></dt>
<dd><p>This method generates all the positive roots of
A_n.  This is half of all of the roots of D_n
by multiplying all the positive roots by -1 we
get the negative roots.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.liealgebras.cartan_type</span> <span class="kn">import</span> <span class="n">CartanType</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">CartanType</span><span class="p">(</span><span class="s2">&quot;A3&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span><span class="o">.</span><span class="n">positive_roots</span><span class="p">()</span>
<span class="go">{1: [1, -1, 0, 0], 2: [1, 0, -1, 0], 3: [1, 0, 0, -1], 4: [0, 1, -1, 0],</span>
<span class="go">        5: [0, 1, 0, -1], 6: [0, 0, 1, -1]}</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_d.TypeD.roots">
<span class="sig-name descname"><span class="pre">roots</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_d.py#L109-L115"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_d.TypeD.roots" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the total number of roots for D_n”</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_d.TypeD.simple_root">
<span class="sig-name descname"><span class="pre">simple_root</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">i</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_d.py#L40-L76"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_d.TypeD.simple_root" title="Permalink to this definition">¶</a></dt>
<dd><p>Every lie algebra has a unique root system.
Given a root system Q, there is a subset of the
roots such that an element of Q is called a
simple root if it cannot be written as the sum
of two elements in Q.  If we let D denote the
set of simple roots, then it is clear that every
element of Q can be written as a linear combination
of elements of D with all coefficients non-negative.</p>
<p>In D_n, the first n-1 simple roots are the same as
the roots in A_(n-1) (a 1 in the ith position, a -1
in the (i+1)th position, and zeroes elsewhere).
The nth simple root is the root in which there 1s in
the nth and (n-1)th positions, and zeroes elsewhere.</p>
<p>This method returns the ith simple root for the D series.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.liealgebras.cartan_type</span> <span class="kn">import</span> <span class="n">CartanType</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">CartanType</span><span class="p">(</span><span class="s2">&quot;D4&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span><span class="o">.</span><span class="n">simple_root</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
<span class="go">[0, 1, -1, 0]</span>
</pre></div>
</div>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="sympy.liealgebras.type_e.TypeE">
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">sympy.liealgebras.type_e.</span></span><span class="sig-name descname"><span class="pre">TypeE</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">n</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_e.py#L5-L287"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_e.TypeE" title="Permalink to this definition">¶</a></dt>
<dd><dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_e.TypeE.basic_root">
<span class="sig-name descname"><span class="pre">basic_root</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">i</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">j</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_e.py#L26-L37"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_e.TypeE.basic_root" title="Permalink to this definition">¶</a></dt>
<dd><p>This is a method just to generate roots
with a -1 in the ith position and a 1
in the jth position.</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_e.TypeE.basis">
<span class="sig-name descname"><span class="pre">basis</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_e.py#L266-L277"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_e.TypeE.basis" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the number of independent generators of E_n</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_e.TypeE.cartan_matrix">
<span class="sig-name descname"><span class="pre">cartan_matrix</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_e.py#L229-L263"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_e.TypeE.cartan_matrix" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the Cartan matrix for G_2
The Cartan matrix matrix for a Lie algebra is
generated by assigning an ordering to the simple
roots, (alpha[1], …., alpha[l]).  Then the ijth
entry of the Cartan matrix is (&lt;alpha[i],alpha[j]&gt;).</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.liealgebras.cartan_type</span> <span class="kn">import</span> <span class="n">CartanType</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">CartanType</span><span class="p">(</span><span class="s1">&#39;A4&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span><span class="o">.</span><span class="n">cartan_matrix</span><span class="p">()</span>
<span class="go">Matrix([</span>
<span class="go">[ 2, -1,  0,  0],</span>
<span class="go">[-1,  2, -1,  0],</span>
<span class="go">[ 0, -1,  2, -1],</span>
<span class="go">[ 0,  0, -1,  2]])</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_e.TypeE.dimension">
<span class="sig-name descname"><span class="pre">dimension</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_e.py#L12-L24"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_e.TypeE.dimension" title="Permalink to this definition">¶</a></dt>
<dd><p>Dimension of the vector space V underlying the Lie algebra</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.liealgebras.cartan_type</span> <span class="kn">import</span> <span class="n">CartanType</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">CartanType</span><span class="p">(</span><span class="s2">&quot;E6&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span><span class="o">.</span><span class="n">dimension</span><span class="p">()</span>
<span class="go">8</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_e.TypeE.positive_roots">
<span class="sig-name descname"><span class="pre">positive_roots</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_e.py#L79-L211"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_e.TypeE.positive_roots" title="Permalink to this definition">¶</a></dt>
<dd><p>This method generates all the positive roots of
A_n.  This is half of all of the roots of E_n;
by multiplying all the positive roots by -1 we
get the negative roots.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.liealgebras.cartan_type</span> <span class="kn">import</span> <span class="n">CartanType</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">CartanType</span><span class="p">(</span><span class="s2">&quot;A3&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span><span class="o">.</span><span class="n">positive_roots</span><span class="p">()</span>
<span class="go">{1: [1, -1, 0, 0], 2: [1, 0, -1, 0], 3: [1, 0, 0, -1], 4: [0, 1, -1, 0],</span>
<span class="go">        5: [0, 1, 0, -1], 6: [0, 0, 1, -1]}</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_e.TypeE.roots">
<span class="sig-name descname"><span class="pre">roots</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_e.py#L215-L226"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_e.TypeE.roots" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the total number of roots of E_n</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_e.TypeE.simple_root">
<span class="sig-name descname"><span class="pre">simple_root</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">i</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_e.py#L39-L77"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_e.TypeE.simple_root" title="Permalink to this definition">¶</a></dt>
<dd><p>Every lie algebra has a unique root system.
Given a root system Q, there is a subset of the
roots such that an element of Q is called a
simple root if it cannot be written as the sum
of two elements in Q.  If we let D denote the
set of simple roots, then it is clear that every
element of Q can be written as a linear combination
of elements of D with all coefficients non-negative.</p>
<p>This method returns the ith simple root for E_n.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.liealgebras.cartan_type</span> <span class="kn">import</span> <span class="n">CartanType</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">CartanType</span><span class="p">(</span><span class="s2">&quot;E6&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span><span class="o">.</span><span class="n">simple_root</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
<span class="go">[1, 1, 0, 0, 0, 0, 0, 0]</span>
</pre></div>
</div>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="sympy.liealgebras.type_f.TypeF">
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">sympy.liealgebras.type_f.</span></span><span class="sig-name descname"><span class="pre">TypeF</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">n</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_f.py#L5-L162"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_f.TypeF" title="Permalink to this definition">¶</a></dt>
<dd><dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_f.TypeF.basic_root">
<span class="sig-name descname"><span class="pre">basic_root</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">i</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">j</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_f.py#L27-L36"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_f.TypeF.basic_root" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate roots with 1 in ith position and -1 in jth position</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_f.TypeF.basis">
<span class="sig-name descname"><span class="pre">basis</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_f.py#L153-L157"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_f.TypeF.basis" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the number of independent generators of F_4</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_f.TypeF.cartan_matrix">
<span class="sig-name descname"><span class="pre">cartan_matrix</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_f.py#L128-L151"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_f.TypeF.cartan_matrix" title="Permalink to this definition">¶</a></dt>
<dd><p>The Cartan matrix for F_4</p>
<p>The Cartan matrix matrix for a Lie algebra is
generated by assigning an ordering to the simple
roots, (alpha[1], …., alpha[l]).  Then the ijth
entry of the Cartan matrix is (&lt;alpha[i],alpha[j]&gt;).</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.liealgebras.cartan_type</span> <span class="kn">import</span> <span class="n">CartanType</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">CartanType</span><span class="p">(</span><span class="s1">&#39;A4&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span><span class="o">.</span><span class="n">cartan_matrix</span><span class="p">()</span>
<span class="go">Matrix([</span>
<span class="go">[ 2, -1,  0,  0],</span>
<span class="go">[-1,  2, -1,  0],</span>
<span class="go">[ 0, -1,  2, -1],</span>
<span class="go">[ 0,  0, -1,  2]])</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_f.TypeF.dimension">
<span class="sig-name descname"><span class="pre">dimension</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_f.py#L12-L24"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_f.TypeF.dimension" title="Permalink to this definition">¶</a></dt>
<dd><p>Dimension of the vector space V underlying the Lie algebra</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.liealgebras.cartan_type</span> <span class="kn">import</span> <span class="n">CartanType</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">CartanType</span><span class="p">(</span><span class="s2">&quot;F4&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span><span class="o">.</span><span class="n">dimension</span><span class="p">()</span>
<span class="go">4</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_f.TypeF.positive_roots">
<span class="sig-name descname"><span class="pre">positive_roots</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_f.py#L70-L119"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_f.TypeF.positive_roots" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate all the positive roots of A_n</p>
<p>This is half of all of the roots of F_4; by multiplying all the
positive roots by -1 we get the negative roots.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.liealgebras.cartan_type</span> <span class="kn">import</span> <span class="n">CartanType</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">CartanType</span><span class="p">(</span><span class="s2">&quot;A3&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span><span class="o">.</span><span class="n">positive_roots</span><span class="p">()</span>
<span class="go">{1: [1, -1, 0, 0], 2: [1, 0, -1, 0], 3: [1, 0, 0, -1], 4: [0, 1, -1, 0],</span>
<span class="go">        5: [0, 1, 0, -1], 6: [0, 0, 1, -1]}</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_f.TypeF.roots">
<span class="sig-name descname"><span class="pre">roots</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_f.py#L122-L126"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_f.TypeF.roots" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the total number of roots for F_4</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_f.TypeF.simple_root">
<span class="sig-name descname"><span class="pre">simple_root</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">i</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_f.py#L38-L68"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_f.TypeF.simple_root" title="Permalink to this definition">¶</a></dt>
<dd><p>The ith simple root of F_4</p>
<p>Every lie algebra has a unique root system.
Given a root system Q, there is a subset of the
roots such that an element of Q is called a
simple root if it cannot be written as the sum
of two elements in Q.  If we let D denote the
set of simple roots, then it is clear that every
element of Q can be written as a linear combination
of elements of D with all coefficients non-negative.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.liealgebras.cartan_type</span> <span class="kn">import</span> <span class="n">CartanType</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">CartanType</span><span class="p">(</span><span class="s2">&quot;F4&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span><span class="o">.</span><span class="n">simple_root</span><span class="p">(</span><span class="mi">3</span><span class="p">)</span>
<span class="go">[0, 0, 0, 1]</span>
</pre></div>
</div>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="sympy.liealgebras.type_g.TypeG">
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">sympy.liealgebras.type_g.</span></span><span class="sig-name descname"><span class="pre">TypeG</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">n</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_g.py#L6-L111"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_g.TypeG" title="Permalink to this definition">¶</a></dt>
<dd><dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_g.TypeG.basis">
<span class="sig-name descname"><span class="pre">basis</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_g.py#L103-L107"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_g.TypeG.basis" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the number of independent generators of G_2</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_g.TypeG.cartan_matrix">
<span class="sig-name descname"><span class="pre">cartan_matrix</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_g.py#L80-L101"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_g.TypeG.cartan_matrix" title="Permalink to this definition">¶</a></dt>
<dd><p>The Cartan matrix for G_2</p>
<p>The Cartan matrix matrix for a Lie algebra is
generated by assigning an ordering to the simple
roots, (alpha[1], …., alpha[l]).  Then the ijth
entry of the Cartan matrix is (&lt;alpha[i],alpha[j]&gt;).</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.liealgebras.cartan_type</span> <span class="kn">import</span> <span class="n">CartanType</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">CartanType</span><span class="p">(</span><span class="s2">&quot;G2&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span><span class="o">.</span><span class="n">cartan_matrix</span><span class="p">()</span>
<span class="go">Matrix([</span>
<span class="go">    [ 2, -1],</span>
<span class="go">    [-3,  2]])</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_g.TypeG.dimension">
<span class="sig-name descname"><span class="pre">dimension</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_g.py#L14-L25"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_g.TypeG.dimension" title="Permalink to this definition">¶</a></dt>
<dd><p>Dimension of the vector space V underlying the Lie algebra</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.liealgebras.cartan_type</span> <span class="kn">import</span> <span class="n">CartanType</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">CartanType</span><span class="p">(</span><span class="s2">&quot;G2&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span><span class="o">.</span><span class="n">dimension</span><span class="p">()</span>
<span class="go">3</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_g.TypeG.positive_roots">
<span class="sig-name descname"><span class="pre">positive_roots</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_g.py#L53-L72"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_g.TypeG.positive_roots" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate all the positive roots of A_n</p>
<p>This is half of all of the roots of A_n; by multiplying all the
positive roots by -1 we get the negative roots.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.liealgebras.cartan_type</span> <span class="kn">import</span> <span class="n">CartanType</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">CartanType</span><span class="p">(</span><span class="s2">&quot;A3&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span><span class="o">.</span><span class="n">positive_roots</span><span class="p">()</span>
<span class="go">{1: [1, -1, 0, 0], 2: [1, 0, -1, 0], 3: [1, 0, 0, -1], 4: [0, 1, -1, 0],</span>
<span class="go">        5: [0, 1, 0, -1], 6: [0, 0, 1, -1]}</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_g.TypeG.roots">
<span class="sig-name descname"><span class="pre">roots</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_g.py#L74-L78"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_g.TypeG.roots" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the total number of roots of G_2”</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.type_g.TypeG.simple_root">
<span class="sig-name descname"><span class="pre">simple_root</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">i</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/type_g.py#L27-L51"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.type_g.TypeG.simple_root" title="Permalink to this definition">¶</a></dt>
<dd><p>The ith simple root of G_2</p>
<p>Every lie algebra has a unique root system.
Given a root system Q, there is a subset of the
roots such that an element of Q is called a
simple root if it cannot be written as the sum
of two elements in Q.  If we let D denote the
set of simple roots, then it is clear that every
element of Q can be written as a linear combination
of elements of D with all coefficients non-negative.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.liealgebras.cartan_type</span> <span class="kn">import</span> <span class="n">CartanType</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">CartanType</span><span class="p">(</span><span class="s2">&quot;G2&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span><span class="o">.</span><span class="n">simple_root</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
<span class="go">[0, 1, -1]</span>
</pre></div>
</div>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="sympy.liealgebras.weyl_group.WeylGroup">
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">sympy.liealgebras.weyl_group.</span></span><span class="sig-name descname"><span class="pre">WeylGroup</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">cartantype</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/weyl_group.py#L7-L402"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.weyl_group.WeylGroup" title="Permalink to this definition">¶</a></dt>
<dd><p>For each semisimple Lie group, we have a Weyl group.  It is a subgroup of
the isometry group of the root system.  Specifically, it’s the subgroup
that is generated by reflections through the hyperplanes orthogonal to
the roots.  Therefore, Weyl groups are reflection groups, and so a Weyl
group is a finite Coxeter group.</p>
<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.weyl_group.WeylGroup.coxeter_diagram">
<span class="sig-name descname"><span class="pre">coxeter_diagram</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/weyl_group.py#L366-L402"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.weyl_group.WeylGroup.coxeter_diagram" title="Permalink to this definition">¶</a></dt>
<dd><p>This method returns the Coxeter diagram corresponding to a Weyl group.
The Coxeter diagram can be obtained from a Lie algebra’s Dynkin diagram
by deleting all arrows; the Coxeter diagram is the undirected graph.
The vertices of the Coxeter diagram represent the generating reflections
of the Weyl group, , s_i.  An edge is drawn between s_i and s_j if the order
m(i, j) of s_i*s_j is greater than two.  If there is one edge, the order
m(i, j) is 3.  If there are two edges, the order m(i, j) is 4, and if there
are three edges, the order m(i, j) is 6.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.liealgebras.weyl_group</span> <span class="kn">import</span> <span class="n">WeylGroup</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">WeylGroup</span><span class="p">(</span><span class="s2">&quot;B3&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="nb">print</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">coxeter_diagram</span><span class="p">())</span>
<span class="go">0---0===0</span>
<span class="go">1   2   3</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.weyl_group.WeylGroup.delete_doubles">
<span class="sig-name descname"><span class="pre">delete_doubles</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">reflections</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/weyl_group.py#L198-L214"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.weyl_group.WeylGroup.delete_doubles" title="Permalink to this definition">¶</a></dt>
<dd><p>This is a helper method for determining the order of an element in the
Weyl group of G2.  It takes a Weyl element and if repeated simple reflections
in it, it deletes them.</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.weyl_group.WeylGroup.element_order">
<span class="sig-name descname"><span class="pre">element_order</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">weylelt</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/weyl_group.py#L115-L196"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.weyl_group.WeylGroup.element_order" title="Permalink to this definition">¶</a></dt>
<dd><p>This method returns the order of a given Weyl group element, which should
be specified by the user in the form of products of the generating
reflections, i.e. of the form r1*r2 etc.</p>
<p>For types A-F, this method current works by taking the matrix form of
the specified element, and then finding what power of the matrix is the
identity.  It then returns this power.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.liealgebras.weyl_group</span> <span class="kn">import</span> <span class="n">WeylGroup</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">b</span> <span class="o">=</span> <span class="n">WeylGroup</span><span class="p">(</span><span class="s2">&quot;B4&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">b</span><span class="o">.</span><span class="n">element_order</span><span class="p">(</span><span class="s1">&#39;r1*r4*r2&#39;</span><span class="p">)</span>
<span class="go">4</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.weyl_group.WeylGroup.generators">
<span class="sig-name descname"><span class="pre">generators</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/weyl_group.py#L23-L43"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.weyl_group.WeylGroup.generators" title="Permalink to this definition">¶</a></dt>
<dd><p>This method creates the generating reflections of the Weyl group for
a given Lie algebra.  For a Lie algebra of rank n, there are n
different generating reflections.  This function returns them as
a list.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.liealgebras.weyl_group</span> <span class="kn">import</span> <span class="n">WeylGroup</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">WeylGroup</span><span class="p">(</span><span class="s2">&quot;F4&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span><span class="o">.</span><span class="n">generators</span><span class="p">()</span>
<span class="go">[&#39;r1&#39;, &#39;r2&#39;, &#39;r3&#39;, &#39;r4&#39;]</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.weyl_group.WeylGroup.group_name">
<span class="sig-name descname"><span class="pre">group_name</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/weyl_group.py#L83-L113"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.weyl_group.WeylGroup.group_name" title="Permalink to this definition">¶</a></dt>
<dd><p>This method returns some general information about the Weyl group for
a given Lie algebra.  It returns the name of the group and the elements
it acts on, if relevant.</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.weyl_group.WeylGroup.group_order">
<span class="sig-name descname"><span class="pre">group_order</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/weyl_group.py#L45-L81"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.weyl_group.WeylGroup.group_order" title="Permalink to this definition">¶</a></dt>
<dd><p>This method returns the order of the Weyl group.
For types A, B, C, D, and E the order depends on
the rank of the Lie algebra.  For types F and G,
the order is fixed.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.liealgebras.weyl_group</span> <span class="kn">import</span> <span class="n">WeylGroup</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">WeylGroup</span><span class="p">(</span><span class="s2">&quot;D4&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span><span class="o">.</span><span class="n">group_order</span><span class="p">()</span>
<span class="go">192.0</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.weyl_group.WeylGroup.matrix_form">
<span class="sig-name descname"><span class="pre">matrix_form</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">weylelt</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/weyl_group.py#L217-L362"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.weyl_group.WeylGroup.matrix_form" title="Permalink to this definition">¶</a></dt>
<dd><p>This method takes input from the user in the form of products of the
generating reflections, and returns the matrix corresponding to the
element of the Weyl group.  Since each element of the Weyl group is
a reflection of some type, there is a corresponding matrix representation.
This method uses the standard representation for all the generating
reflections.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.liealgebras.weyl_group</span> <span class="kn">import</span> <span class="n">WeylGroup</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">f</span> <span class="o">=</span> <span class="n">WeylGroup</span><span class="p">(</span><span class="s2">&quot;F4&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">f</span><span class="o">.</span><span class="n">matrix_form</span><span class="p">(</span><span class="s1">&#39;r2*r3&#39;</span><span class="p">)</span>
<span class="go">Matrix([</span>
<span class="go">[1, 0, 0,  0],</span>
<span class="go">[0, 1, 0,  0],</span>
<span class="go">[0, 0, 0, -1],</span>
<span class="go">[0, 0, 1,  0]])</span>
</pre></div>
</div>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="sympy.liealgebras.cartan_type.CartanType_generator">
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">sympy.liealgebras.cartan_type.</span></span><span class="sig-name descname"><span class="pre">CartanType_generator</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/cartan_type.py#L4-L47"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.cartan_type.CartanType_generator" title="Permalink to this definition">¶</a></dt>
<dd><p>Constructor for actually creating things</p>
</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="sympy.liealgebras.cartan_type.Standard_Cartan">
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">sympy.liealgebras.cartan_type.</span></span><span class="sig-name descname"><span class="pre">Standard_Cartan</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">series</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">n</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/cartan_type.py#L52-L73"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.cartan_type.Standard_Cartan" title="Permalink to this definition">¶</a></dt>
<dd><p>Concrete base class for Cartan types such as A4, etc</p>
<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.cartan_type.Standard_Cartan.rank">
<span class="sig-name descname"><span class="pre">rank</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/cartan_type.py#L63-L67"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.cartan_type.Standard_Cartan.rank" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the rank of the Lie algebra</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.liealgebras.cartan_type.Standard_Cartan.series">
<span class="sig-name descname"><span class="pre">series</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/cartan_type.py#L69-L73"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.cartan_type.Standard_Cartan.series" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the type of the Lie algebra</p>
</dd></dl>

</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="sympy.liealgebras.dynkin_diagram.DynkinDiagram">
<span class="sig-prename descclassname"><span class="pre">sympy.liealgebras.dynkin_diagram.</span></span><span class="sig-name descname"><span class="pre">DynkinDiagram</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">t</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/dynkin_diagram.py#L4-L24"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.dynkin_diagram.DynkinDiagram" title="Permalink to this definition">¶</a></dt>
<dd><p>Display the Dynkin diagram of a given Lie algebra</p>
<p>Works by generating the CartanType for the input, t, and then returning the
Dynkin diagram method from the individual classes.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.liealgebras.dynkin_diagram</span> <span class="kn">import</span> <span class="n">DynkinDiagram</span>
<span class="gp">&gt;&gt;&gt; </span><span class="nb">print</span><span class="p">(</span><span class="n">DynkinDiagram</span><span class="p">(</span><span class="s2">&quot;A3&quot;</span><span class="p">))</span>
<span class="go">0---0---0</span>
<span class="go">1   2   3</span>
</pre></div>
</div>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="nb">print</span><span class="p">(</span><span class="n">DynkinDiagram</span><span class="p">(</span><span class="s2">&quot;B4&quot;</span><span class="p">))</span>
<span class="go">0---0---0=&gt;=0</span>
<span class="go">1   2   3   4</span>
</pre></div>
</div>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="sympy.liealgebras.cartan_matrix.CartanMatrix">
<span class="sig-prename descclassname"><span class="pre">sympy.liealgebras.cartan_matrix.</span></span><span class="sig-name descname"><span class="pre">CartanMatrix</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">ct</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/liealgebras/cartan_matrix.py#L3-L25"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.liealgebras.cartan_matrix.CartanMatrix" title="Permalink to this definition">¶</a></dt>
<dd><p>Access the Cartan matrix of a specific Lie algebra</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.liealgebras.cartan_matrix</span> <span class="kn">import</span> <span class="n">CartanMatrix</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">CartanMatrix</span><span class="p">(</span><span class="s2">&quot;A2&quot;</span><span class="p">)</span>
<span class="go">Matrix([</span>
<span class="go">[ 2, -1],</span>
<span class="go">[-1,  2]])</span>
</pre></div>
</div>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">CartanMatrix</span><span class="p">([</span><span class="s1">&#39;C&#39;</span><span class="p">,</span> <span class="mi">3</span><span class="p">])</span>
<span class="go">Matrix([</span>
<span class="go">[ 2, -1,  0],</span>
<span class="go">[-1,  2, -1],</span>
<span class="go">[ 0, -2,  2]])</span>
</pre></div>
</div>
<p>This method works by returning the Cartan matrix
which corresponds to Cartan type t.</p>
</dd></dl>

</section>


            <div class="clearer"></div>
          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><a href="../../index.html">
              <img class="logo" src="../../_static/sympylogo.png" alt="Logo"/>
            </a></p>
  <h4>Previous topic</h4>
  <p class="topless"><a href="../interactive.html"
                        title="previous chapter">Interactive</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="../logic.html"
                        title="next chapter">Logic</a></p>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../../_sources/modules/liealgebras/index.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3 id="searchlabel">Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="https://docs.sympy.org/latest/search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>
    </div>
</div>
<script>$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="../logic.html" title="Logic"
             >next</a> |</li>
        <li class="right" >
          <a href="../interactive.html" title="Interactive"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../../index.html">SymPy 1.9 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="../index.html" >SymPy Modules Reference</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="#">Lie Algebra</a></li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &#169; Copyright 2021 SymPy Development Team.
      Last updated on Sep 30, 2021.
      Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.1.2.
    </div>
  </body>

<!-- Mirrored from docs.sympy.org/latest/modules/liealgebras/index.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 15 Jan 2022 03:24:30 GMT -->
</html>